package com.qf.quduba;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@MapperScan("com.qf.quduba.dao")
public class QudubaApplication {

    public static void main(String[] args) {
        SpringApplication.run(QudubaApplication.class, args);
    }

    @Bean
    public RestHighLevelClient restHighLevelClient(){
        RestHighLevelClient client = new RestHighLevelClient(
                RestClient.builder( new HttpHost("39.99.161.217", 9200, "http")));
        return client;
    }
}
